package behavior.State;

/**
 * Created by LYJ on 2016/10/21.
 * 房间入住状态
 */
public class CheckInState implements State
{
    private Room hotelManagement;

    public CheckInState(Room hotelManagement)
    {
        this.hotelManagement = hotelManagement;
    }
    @Override
    public void bookRoom()
    {
        System.out.println("该房间已经入住了");
    }

    @Override
    public void unsubscribeRoom()
    {
    }

    @Override
    public void checkInRoom()
    {
        System.out.println("该房间已经入住了");
    }

    @Override
    public void checkOutRoom()
    {
        System.out.println("退房成功");
        this.hotelManagement.setState(this.hotelManagement.getFreeTimeState());
    }
}
